package com.IT.controller;


import com.IT.constent.CommonConst;
import com.IT.entity.Result;
import com.IT.service.UserService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @Reference
    UserService userService;
    @RequestMapping("/login")
    public Result login(String username,String password) {
        boolean flag = userService.login(username, password);
       if(flag){
           return new Result(flag, CommonConst.ACTION_SUCCESS);
       }
       return new Result(false,CommonConst.ACTION_FATL);
    }
}
